import request from '@/utils/request'

// 首页数据
export function getList (params) {
  return request({
    url: '/sys/back/wxAgent/getAgentList',
    method: 'get',
    params
  })
}


//禁用启用管理员
export function updAgentIsFlag (data) {
  return request({
    method:'post',
    data,
    url: '/sys/back/wxAgent/updAgentIsFlag'
  })
}

//管理员角色类型
export function getWxRoleList (params) {
  return request({
    method:'get',
    params,
    url: '/sys/back/wxRole/getWxRoleList'
  })
}


export function getAllWxRoleList (params) {
  return request({
    method:'get',
    params,
    url: '/sys/back/wxRole/getAllWxRoleList'
  })
}

//新增管理员呢

export function addAgent (data) {
  return request({
    method:'post',
    data,
    url: '/sys/back/wxAgent/addAgent'
  })
}


//编辑代理人
export function updAgent (data) {
  return request({
    method:'post',
    data,
    url: '/sys/back/wxAgent/updAgent'
  })
}

//修改密码
export function changePwd (data) {
  return request({
    method:'put',
    data,
    url: '/api/sys-manager/back/updatePwd'
  })
}